<!DOCTYPE html>
<html lang="zh_CN">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>旁路系统</title>
  <link rel="stylesheet" href="/css/bootstrap.min.css">
  <link rel="stylesheet" href="/css/bootstrap-theme.min.css">
  <link rel="stylesheet" href="/css/main.css">
</head>

<body>
  <nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <a href="/" class="navbar-brand">MySQL ByRoad</a>
      </div>
      <div class="navbar-collpase collpase">
        <ul class="nav navbar-nav navbar-center">
          <li><a href="/addtask">任务添加</a></li>
          <li>
            <a href="#" data-toggle="dropdown">任务管理<span class="caret"></span></a>
            <ul class="dropdown-menu">
                <li><a href="/task/createuser/{{username}}">我的任务</a></li>
                <li><a href="/task">所有任务</a></li>
            </ul>
          </li>
          <li>
            <a href="#" data-toggle="dropdown">分组任务<span class="caret"></span></a>
            <ul class="dropdown-menu">
              {% for category in categories%}
              <li><a href="/task/category/{{category}}">{{category}}</a></li>
              {% endfor%}  
            </ul>
          </li>
          {% if user.Role >= 0 %}
          <li>
            <a href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                审计管理<span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li><a href="/apply">我的申请</a></li>
                {% if user.Role >= 1 %}
                <li><a href="/audit">我的审计</a></li>
                <li><a href="/allaudit">所有审计</a></li>
                {% endif %}
            </ul>
          </li>
          {% endif %}
          
          {% if user.Role >= 3 %}
          <li>
            <a href="/user-list" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              用户管理<span class="caret"></span></a>
            <ul class="dropdown-menu">
                <li><a href="/user-add">添加用户</a></li>
                <li><a href="/user-list">用户列表</a></li>
            </ul>
          </li>
          {% endif %}
          <li><a href="/status">状态</a></li>
          <li><a href="/help">帮助</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li class="">
            <a href="/auth/logout">退出 ({{username}})</a>
          </li>
        </ul>
        <div class="form-group navbar-form navbar-right">
          <select class="form-control" id="client">
          {%for client in clients%}
            <option value="{{client.Desc}}">{{client.Desc}}</option>
          {%endfor%}
          </select>
        </div>
      </div>
    </div>
  </nav>
<div>
  {{ error }}
</div>